#pragma once
#include "afxwin.h"
#include "afxcmn.h"


// CDlgTraderFromList dialog

class CDlgTraderFromList : public CDialog
{
	DECLARE_DYNAMIC(CDlgTraderFromList)

public:
	CDlgTraderFromList(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgTraderFromList();

// Dialog Data
	enum { IDD = IDD_DLG_TRADER_FROM_LIST };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	CComboBox m_comboBrokers;
	CComboBox m_comboTradeLine;
	CListCtrl m_listTrader;
	ITraderKeyEx    m_traderKeyEx;
	afx_msg void OnBnClickedBtnQueryBroker();
	afx_msg void OnBnClickedBtnQueryTradeline();
	afx_msg void OnBnClickedOk();
	void CDlgTraderFromList::initUIStyle();
	void CDlgTraderFromList::GetAllBrokers();
	void CDlgTraderFromList::GetAllTradeLines();
	void CDlgTraderFromList::displayTraderList();
	int CDlgTraderFromList::GetSelectItemIndex();
	ITraderKeyEx CDlgTraderFromList::GetSelectTraderKeyEx();
	ITraderKeyEx CDlgTraderFromList::GetTraderKeyEx();
	BOOL CDlgTraderFromList::PreTranslateMessage(MSG* pMsg);

	afx_msg void OnNMClickListTrader(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMDblclkListTrader(NMHDR *pNMHDR, LRESULT *pResult);
	virtual BOOL OnInitDialog();
};
